package com.warrior.superdata.constants;

/**
 * @author xujian
 * @ClassName: CommonConstant
 * @Description: (常量类)
 * @date 2017年11月3日
 */
public final class CommonConstant {

    /**
     * 500:系统出错
     */
    public final static int CONSTANT_SERVER_ERROR = 500;
    /**
     * 403:没有权限
     */
    public final static int CONSTANT_NO_AUTHORITY = 403;
    /**
     * 400 请求参数有误
     */
    public final static int CONSTANT_ERROR_PARAMETER = 400;
    /**
     * 1002 参数非法
     */
    public final static int CONSTANT_ILLEGAL_PARAMETER = 1001;
    /**
     * 401:尚未登陆
     */
    public final static int CONSTANT_NO_PROMISSION = 401;
    /**
     * 200:正常返回
     */
    public final static int CONSTANT_REQUEST_SUCCESS = 200;

    /**
     * 成功状态码
     */
    public final static Integer CONSTANT_CODE_SUCCESS = 0;
    /**
     * 新增标签
     */
    public final static Integer CONSTANT_TAG_ADD = 1;
    /**
     * 删除标签
     */
    public final static Integer CONSTANT_TAG_DEL = -1;
    /**
     * 标签串删除标注
     */
    public final static Integer CONSTANT_TAGSPLICE_DEL = 0;

    public final static String CONSTANT_STRING_SUCCESS = "200";

    public final static String CONSTANT_VIAS_SUCCESS = "1000";

    public final static String CONSTANT_CODE_STYLE = "UTF-8";

    public final static String CONSTANT_REQUEST_OK = "OK";

    /**
     * date类型和string之间的转换格式
     */
    public final static String CONSTANT_DATE_FORMAT = "yyyy-MM-dd";
    /**
     * date类型和string之间的转换格式
     */
    public final static String CONSTANT_DATE_NUM_FORMAT = "yyyyMMdd";
    /**
     * date类型和string之间的转换格式
     */
    public final static String CONSTANT_DATE_FORMAT_MONTH = "yyyy-MM";
    /**
     * date类型和string之间的转换格式
     */
    public final static String CONSTANT_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    /**
     * date类型和string之间的转换格式
     */
    public final static String CONSTANT_DATENUM_FORMAT = "yyyyMMddHHmmss";
    /**
     * 默认日期格式(数据库存储格式)
     */
    public static final String DEFAULT_DATE_FORMAT_SHORT_PATTERN = "yyyyMMdd";

    public static final Integer CONSTANT_VALID_STATUS = 1;

    public static final Integer CONSTANT_UNVALID_STATUS = 0;

    public static final String CONSTANT_INSERT_SUCCESS = "新增成功";

    public static final String CONSTANT_UPDATE_SUCCESS = "更新成功";

    public static final String CONSTANT_DELETE_SUCCESS = "删除成功";
    /**
     * mysql
     */
    public static final Integer DATASOURCE_MYSQL = 1;
    /**
     * es
     */
    public static final Integer DATASOURCE_ES = 2;
    /**
     * 返回数据类型 0:单条数据
     */
    public static final Integer API_DATA_RESULT_SINGLE = 0;
    /**
     * 返回数据类型 1:数组
     */
    public static final Integer API_DATA_RESULT_ARR = 1;
    /**
     * 返回数据类型 2:分页
     */
    public static final Integer API_DATA_RESULT_PAGE = 2;
    /**
     * 参数类型 0:url传参
     */
    public static final Integer API_PARAM_URL = 0;
    /**
     * 参数类型 1:请求体传参
     */
    public static final Integer API_PARAM_BODY = 1;
    /**
     * 必要参数
     */
    public static final Integer PARAM_REQUIRED = 1;
    /**
     * 导出接口
     */
    public static final Integer EXPORT_API = 1;
    /**
     * 自定义sql
     */
    public static final Integer API_CUSTOMIZESQL = 1;
    /**
     * 字段集合拼接符号
     */
    public static final String FIELD_VALUE_SPLICE_LIST = "&&";
    /**
     * "null" 字符串
     */
    public static final String NULL_STRING = "null";
    /**
     * 自定义sql中boday传参识别
     */
    public static final String BODY_PARAM_STR = "#1";

    public final static String ES_DOC = "_doc";

    public final static String STRING_STR = "string";

    public final static String DATE_STR = "date";



}
